<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var dm;
        var zm;
        var xm;
        for(var dm=0;dm<=50;++dm)
        {

            for(var zm=0;zm<=100;++zm)
            {
                for(var xm=2;xm<=200;xm+=2)
                {
                    if(2*dm+zm+xm/2==100)
                    {
                        if(dm+zm+xm==100){
                        document.write(dm);
                        document.write('需要大马');
                        document.write(zm);
                        document.write('需要中马');
                        document.write(xm);
                        document.write('需要小马<br>');
                        }
           
                    }
                }
            }
        }
    </script>
</body>
</html>